<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>添加用户</title>
<link href="/res/css/style.css" rel="stylesheet" type="text/css" />
<link href="/res/css/select.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/res/js/jquery.js"></script>
<script type="text/javascript" src="/res/js/select-ui.min.js"></script>
<script type="text/javascript" src="/res/js/lib/formvalid/FormValid.js"></script>
<link href="/res/js/lib/layer/skin/layer.css" rel="stylesheet" type="text/css" />
<link href="/res/js/lib/layer/skin/layer.ext.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/res/js/lib/layer/layer.js"></script>
<script type="text/javascript" src="/res/js/common/msgTools.js"></script>
<script type="text/javascript" src="/res/js/pages/user/userAdd.js"></script>

<script type="text/javascript">
	$(document).ready(function(e) {
		$("select").uedSelect({});	
	});
</script>
</head>

<body style="overflow-x:hidden;">
	<div class="formbody">

		<form action="/user/add/save" method="post" onsubmit="return checkData(this)">
			<div id="tab1" class="tabson">
				<ul class="forminfo">
					<li><label>用户名<b>*</b></label> <input name="name" value="${user.name}" valid="required|limit" type="text" class="dfinput" style="width:150px;" />
					    <span id="errMsg_name" class="errMsg">*用户名为6~20个字符</span>
					</li>
					<li><label>密码<b>*</b></label> <input name="password" value="${user.password}" valid="required|limit"  max="20" min="6"  type="password" class="dfinput" style="width:150px;" />
					    <span id="errMsg_password" class="errMsg">*请输入密码6~20位</span>
					</li>
					<li><label>确认密码<b>*</b></label> <input name="rePassword" value="${user.rePassword}" valid="required|limit"  max="20" min="6" type="password" class="dfinput" style="width:150px;" />
					    <span id="errMsg_rePassword" class="errMsg">*请输入确认密码6~20位</span>					
					</li>
					<li><label>性别<b>*</b></label>
						<div class="vocation">
							<select class="select1" name="sex" width="150">
								<option value="M">男</option>
								<option value="F">女</option>
							</select>
						</div></li>					
					<li><label>推荐人</label> <input id="txtPName" name="pName" value="${user.pName}" type="text" class="dfinput" style="width:150px;" ></input>
					    <img id="imgValid" src="" alt="" class="hide"/>
					    <span id="errMsg_pName" class="errMsg">请输入推荐人</span>
					</li>
					<li><label>手机号<b>*</b></label> <input name="mobile" value="${user.mobile}" valid="required|isMobile"  max="11" min="11" type="text" class="dfinput" style="width:150px;" />
					    <span id="errMsg_mobile" class="errMsg">*请输入手机号</span>					
					</li>
					<li><label>用户级别<b>*</b></label>
						<div class="vocation">
							<select class="select1" name="level" width="150">
								<option value="comm">普通会员</option>
								<option value="vip">vip会员</option>
								<option value="gold">金钻会员</option>
							</select>
						</div></li>
					<li><label>Email<b>*</b></label> <input name="email"  value="${user.email}" valid="isEmail" max="10" min="5" type="text" class="dfinput" style="width:150px;" />
					    <span id="errMsg_email" class="errMsg">*请输入邮箱</span>					
					</li>					
					<li><label>状态<b>*</b></label>
						<label>有效<input type="radio" name="isEffect" value="1" ${user.isEffect==1?"checked":""}/></label>
						<label>无效<input type="radio" name="isEffect" value="0" ${user.isEffect==1?"":"checked"}/></label>					
					</li> 					
					<li><label>&nbsp;</label> <input type="submit" class="btn" value="保 存" /></li>
				</ul>
			</div>
		</form>
	</div>
	${actionMsg}
</body>

</html>


